﻿using FreeSql.DatabaseModel;using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace DataBase.Main {

	[JsonObject(MemberSerialization.OptIn), Table(Name = "t_Alarm", DisableSyncStructure = true)]
	public partial class TAlarm {

		/// <summary>
		/// 主键唯一标识Id
		/// </summary>
		[JsonProperty, Column(IsPrimary = true, IsIdentity = true)]
		public long Id { get; set; }

		/// <summary>
		/// 报警编码
		/// </summary>
		[JsonProperty]
		public int? AlarmCode { get; set; }

		/// <summary>
		/// 处理原因
		/// </summary>
		[JsonProperty, Column(StringLength = -2)]
		public string Cause { get; set; }

		/// <summary>
		/// 报警内容
		/// </summary>
		[JsonProperty, Column(StringLength = -2)]
		public string Content { get; set; }

		/// <summary>
		/// 数据录入时间
		/// </summary>
		[JsonProperty]
		public DateTime? CreateTime { get; set; }

		/// <summary>
		/// 设备id十进制形式
		/// </summary>
		[JsonProperty, Column(Name = "deviceId")]
		public long? DeviceId { get; set; }

		/// <summary>
		/// 报警结束时间
		/// </summary>
		[JsonProperty]
		public DateTime? EndTime { get; set; }

		/// <summary>
		/// 报警结束标识
		/// </summary>
		[JsonProperty]
		public int? Flag { get; set; }

		/// <summary>
		/// 处理内容
		/// </summary>
		[JsonProperty, Column(Name = "handContent", StringLength = -2)]
		public string HandContent { get; set; }

		/// <summary>
		/// 处理时间
		/// </summary>
		[JsonProperty, Column(Name = "handEndTime")]
		public DateTime? HandEndTime { get; set; }

		/// <summary>
		/// 处理人员
		/// </summary>
		[JsonProperty, Column(Name = "handUser", StringLength = 50)]
		public string HandUser { get; set; }

		/// <summary>
		/// 开始时间
		/// </summary>
		[JsonProperty]
		public DateTime? StartTime { get; set; }

		/// <summary>
		/// 报警处理状态
		/// </summary>
		[JsonProperty]
		public long? Status { get; set; }

		/// <summary>
		/// 设备唯一标识
		/// </summary>
		[JsonProperty, Column(StringLength = -2)]
		public string TerminalId { get; set; }

		/// <summary>
		/// 报警值
		/// </summary>
		[JsonProperty, Column(DbType = "decimal(18,2)")]
		public decimal? Value { get; set; }

	}

}
